/*cnpm install express --save*/
/*cnpm install cors --save*/
var Express = require('express')
var app = new Express();
var cors=require('cors')
var userRouter = require('./router/user')
var creatorRouter = require('./router/basic/creator')
var employeeRouter = require('./router/basic/empolyee')
var incomeRouter = require('./router/basic/income')
var sysUserRouter = require('./router/basic/sysUser')
var videoRouter = require('./router/basic/video')
app.use(cors());
app.use('/video',videoRouter);
app.use('/user',userRouter);
app.use('/creator',creatorRouter);
app.use('/employee',employeeRouter);
app.use('/sysUser',sysUserRouter);
app.use('/income',incomeRouter);
var server=app.listen('3000','localhost',function (req,res) {

  var host= server.address().address;
  var post=server.address().port;

  console.log('the server in running on http://%s:%s',host,post);

})
